Better error message with details around lib and bin.
None => {}
}
if !manifest.targets().iter().any(|t| !t.is_custom_build()) {
- return Err(human(format!("either a [lib] (lib.rs) or [[bin]] (main.rs) section must \
- be present in src")))
+ return Err(human(format!("no targets specified in the manifest \neither \
+ src/lib.rs, src/main.rs, a [lib] section, or [[bin]] \
+ section must be present")))
}
return Ok((manifest, paths));
failed to parse manifest at `[..]Cargo.toml`
Caused by:
- either a [lib] (lib.rs) or [[bin]] (main.rs) section must be present in src\n"));
+ no targets specified in the manifest
+
+ either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present\n"));
});
test!(lto_build {
failed to parse manifest at `[..]`
Caused by:
- either a [lib] (lib.rs) or [[bin]] (main.rs) section must be present in src"));
+ no targets specified in the manifest
+
+ either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present"));
});
test!(shared_dep_with_a_build_script {